const http = require('http');

const options = {
    hostname: '127.0.0.1',
    port: 5000,
    path: '/health',
    method: 'GET'
};

console.log('测试服务器连接...');

const req = http.request(options, (res) => {
    console.log('状态码:', res.statusCode);
    
    res.on('data', (d) => {
        console.log('响应数据:', d.toString());
    });
});

req.on('error', (error) => {
    console.error('请求错误:', error);
});

req.end(); 